package com.spr.controller;

import com.spr.request.SprDeviceCoordinate;
import com.spr.service.SprDeviceCameraInfoService;
import com.spr.vo.SprDeviceCameraInfoVO;
import com.spr.vo.SprDeviceCompleteRecordVO;
import com.spr.vo.SprDeviceInfoVO;
import com.spr.vo.SprSiteInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;

@RestController
@RequestMapping("/sprDeviceCameraInfo")
@Slf4j
@Api(tags = "设备摄像头详情-控制类")
public class SprDeviceCameraInfoController {
    @Autowired
    private SprDeviceCameraInfoService sprDeviceCameraInfoService;
    @ApiOperation(value = "摄像头列表（可传经纬度，不传金纬度查询全部）")
    @GetMapping("/cameraList")
    public ResponseEntity<List<SprDeviceCameraInfoVO>> cameraList(@RequestParam(required = false) BigDecimal longitude ,@RequestParam(required = false) BigDecimal latitude){
        List<SprDeviceCameraInfoVO> sprDeviceCameraInfoVOS= sprDeviceCameraInfoService.cameraList(latitude,longitude);
        return ResponseEntity.ok(sprDeviceCameraInfoVOS);
    }




}
